package com.hrhr74.penguinstream.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class UserEditFactory {
    @Autowired
    public Map<String,UserEdit> map ;

    UserEdit createUserEdit(String type){

        return getUserEdit(type);
    }


    public UserEdit getUserEdit(String type){
        if(map.get(type) == null){
            throw new RuntimeException("修改方式有误");
        }

        return map.get(type);
    }
}
